import  JsonSeriable from "./JsonSeriable"
import {seriUniCode} from "./jsonSeriableConstants"
export default class JsonSeriType extends JsonSeriable{
	static _seriType ={
		"type":"JsonSeriType",
		"page":"jsonSeri"
	};
	#type;
	#page;
	constructor(type,page){
		super();
		this.#type = type;
		this.#page = page;
	}
	
	get type(){
		return this.#type;
	}
	
	set type(v){
		this.#type = v ;
	}
	
	get page(){
		return this.#page;
	}
	
	set page(v){
		this.#page = v ;
	}
	toSeriObj(){
		let gsObj = this.genSeriObj();
		return {
			obj: gsObj,
			type:JsonSeriType._seriType,
			version:super.seriVersion,
			_seriUniCode: seriUniCode
		};
	}
	genSeriObj(){
		let ret={
			"type":this.#type,
			"page":this.#page
		};
		return ret;
	}
	
	seriObj(obj){
		
		this.#type =  obj.type;
		this.#page =  obj.page;
		
		
	}
	
}